import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Random random = new Random();
        int number = random.nextInt(100)+1;
        System.out.print("输入一个1---100的整数:");
        Scanner scanner = new Scanner(System.in);
        while (true) {
            int guess = scanner.nextInt();
            if (guess == number) {
                System.out.println("猜对了");
                break;
            } else if (guess > number) {
                System.out.println("猜大了");
            } else System.out.println("猜小了");
        }
    }
}
